The Financial and Critical Impact of Female Representation in Films: A Study of Bechdel Test Outcomes

Authors

Calderon Flores, Ivana Dayneth

Jaouad, Dorra

Krafft, Mathilde

1. Introduction

1.1 Background and motivation

The Bechdel Test serves as a widely recognized measure of female representation in films. To pass the test, a movie nmust have at least two named female characters who talk to each other of something other than a man. This test is highlighting important discussions surrounding diversity and gender equality within the film industry. This topic is significant as it not only addresses the representation of women but also engages with broader societal issues such as gender stereotypes and equity.

The intersection of cultural metrics, exemplified by the Bechdel Test, and economic variables, including a film’s budget and revenue, renders this research particularly compelling. By exploring how diversity impacts a film’s commercial and critical success, the study examines two key dimensions: cultural representation and its potential economic and critical consequences.

This research aligns with the overarching goal of leveraging data-driven insights to comprehend the effects of cultural dynamics on creative industries. Through a combination of statistical, predictive, and exploratory analyses, the project aims to address questions of both social significance and commercial relevance.

1.2 Project Objectives

1.2.1 Main Objective

The primary objective of this project is to investigate the relationship between the Bechdel Test and other film-related factors, such as budget, genre, and director, on a film’s revenue. The specific aims include:

  • Analyzing whether passing the Bechdel Test has a statistically significant effect on domestic gross or overall revenue.

  • Assessing if films that pass the Bechdel Test tend to win more awards or achieve higher IMDb ratings.

1.2.2 Sub-goals

  1. Predictive Modeling: Developing a predictive model to estimate a film’s success based on various factors, including the Bechdel Test result, its correlation with awards, and IMDb ratings. This model will provide insights into the probability of a film passing the Bechdel Test based on attributes such as budget, genre, and director.

  2. Correlation Exploration: Investigating correlations between a film’s performance on the Bechdel Test and its revenue, as well as its awards and IMDb ratings, to uncover potential patterns and insights.

  3. Trend Visualization: Visualizing trends between films that either pass or fail the Bechdel Test and their associated economic data, including revenues, budgets, awards won, and IMDb ratings. This visualization will help elucidate the relationship between female representation and film success.

1.3. Research Questions

In this section, we pose the following research questions to explore the potential influence of female representation in films on commercial and critical success. By examining correlations between Bechdel Test results and metrics like revenue, awards, and IMDb ratings, we aim to identify patterns that link gender diversity with performance outcomes. Additionally, we explore predictive models to assess whether factors such as budget, genre, and director can reliably estimate both a film’s success and its likelihood of passing the Bechdel Test. These questions guide our analysis to uncover data-driven insights into the economic and critical impact of gender representation in the film industry.

  1. Is there a significant correlation between passing the Bechdel test and a film’s revenue?
  2. Do films that pass the Bechdel test tend to win more awards or receive higher IMDb ratings? 
  3. Can we build a predictive model to estimate a film’s success (revenue, awards, IMDb ratings) based on the Bechdel test results and other factors like budget, genre, and director?
  4. Can we develop a predictive model to determine whether a film will pass the Bechdel test based on factors such as budget, genre, and director?

1.4. Data Collection

In this section, we outline the process of data collection and merging. The data sources for this project were obtained from data.world, where we can access to the following datasets:

  • Dataset df: It contains information regarding the Bechdel test outcomes for various films. The information was gather from BechdelTest.com and The-Numbers.com. The dataset can be accessed directly from: Bechdel test outcomes.

  • Dataset df2: It includes additional film-related data, such as budget, revenue, genre, director, and awards. This information comes from the Imdb dataset. The dataset can be accessed from the link: Films data

The two datasets were successfully merged into a single primary data frame using the IMDb ID as the key. This process resulted in a consolidated dataset comprising 1,792 rows. Specific columns of interest were selected to facilitate further analysis and ensure the relevance of the data to our research objectives.

Show the code
# Read json file
df <- fromJSON("https://query.data.world/s/mel73qzc35dvjcs54h4x4tatmvveaj?dws=00000")

# Read csv file
df2 <- read.csv("https://query.data.world/s/zosxjqvjiygclw2wix74pcp4vyesvb?dws=00000", header=TRUE, stringsAsFactors=FALSE);

#Merge the two dataset
merged_data <- merge(df2, df, by.x = "imdb", by.y = "imdbID", all = FALSE)

#Remove unwanted columns
df_final <- subset(merged_data, select = -c(domgross_2013.,Writer,Year, Actors, imdb, title, test, clean_test, domgross, intgross, Plot, code, period.code,decade.code, budget, Rated, Response, Metascore, Released, Runtime, Type, Poster, Error ))

2. Data Cleaning

In the data cleaning section, we ensure the dataset is prepared for effective analysis by addressing any inconsistencies, missing values, and irrelevant entries. This process involves examining each variable to standardize formats, handle null values, and remove duplicates, ultimately enhancing the accuracy and reliability of the Exploratory Data Analysis and modeling phases. By refining the dataset, we lay a strong foundation for meaningful insights and trustworthy results in subsequent analyses.

2.1 Standardizing Column Names

This section focuses on renaming columns to create a consistent and clear naming convention across the dataset, ensuring easier readability and usability for analysis.

Show the code
#Rename column

df_final <- df_final %>% 
  rename( Year = year, Bechdel_test_result = binary, Budget = budget_2013., Revenue = intgross_2013., Movie_Title = Title, Country_of_Origin = Country, Imdb_Rating = imdbRating, Imdb_Votes = imdbVotes)

# Define old and new column names
old_names <- c("year", "binary", "budget_2013.", "intgross_2013.", "Title", "Country", "imdbRating", "imdbVotes")
new_names <- c("Year", "Bechdel_test_result", "Budget", "Revenue", "Movie_Title", "Country_of_Origin", "Imdb_Rating", "Imdb_Votes")

# Create a DataFrame to show the mapping
columns_mapping <- data.frame(
  `Old_Name` = old_names,
  `New_Name` = new_names
)

# Display the styled table
columns_mapping %>%
  gt() %>% 
  tab_style(
    style = list(
      cell_text(weight = "bold", color = "white"),
      cell_fill(color = "#0095C8")
    ),
    locations = cells_column_labels(everything())
  ) %>%
  cols_align(
    align = "center",
    columns = everything()
  )
Old_Name New_Name
year Year
binary Bechdel_test_result
budget_2013. Budget
intgross_2013. Revenue
Title Movie_Title
Country Country_of_Origin
imdbRating Imdb_Rating
imdbVotes Imdb_Votes

2.2 Isolating Individual Values by Language, Genre, and Director

Here, we separated entries with multiple values in the Language, Genre, and Director columns, creating distinct rows for each value. This transformation enables more granular analysis by ensuring each entry corresponds to a single language, genre, or director.

Show the code
# Seperate the language

df_final <- df_final %>%
  separate_rows(Language, sep = ", ")

# Seperate the Genre
df_final <- df_final %>%
  separate_rows(Genre, sep = ", ")

# Seperate the Director
df_final <- df_final %>%
  separate_rows(Director, sep = ", ")

2.3 Extracting and Summarizing Award Wins, Nominations, and Creating a New Column for Award Status

We parsed the awards column to isolate and categorize Oscar and other award wins and nominations. We then created a new binary column, awards, which indicates whether the film has won any award (1 for wins, 0 for no wins). Additionally, we extracted the relevant numerical values for Wins and Nominations into separate columns to enable a more detailed analysis of the film’s award performance. To streamline the dataset, unnecessary intermediate columns were removed, focusing on the most important award-related variables.

Show the code
# Extract Wins and Nominations
# Updated code to process each row individually
df_final <- df_final %>%
  rowwise() %>%
  mutate(
    # Extract numbers after "Won " and before "wins"
    oscar_wins = replace_na(
      str_extract(Awards, "(?i)(\\d+)(?= win(s)?)") %>%
        str_replace_all("Another ", "") %>%
        as.numeric(), 
      0),
    
    # Extract numbers before "win(s)"
    other_wins = replace_na(
      str_extract(Awards, "(?i)\\bWon (\\d+)") %>%
        str_replace_all("Won ", "") %>%
        as.numeric(),
      0),
    
    Wins = rowSums(across(c(oscar_wins, other_wins))),
    
    oscar_nominations = replace_na(
      str_extract(Awards, "(?i)\\bNominated for (\\d+)") %>%
        str_replace_all("Nominated for ", "") %>%
        as.numeric(), 
      0),
    other_nominations = replace_na(
      str_extract(Awards, "(?i)(\\d+)(?= nomination(s)?)") %>%
        str_replace_all("Nominated ", "") %>%
        as.numeric(),
      0),
    
    Nominations = rowSums(across(c(oscar_nominations, other_nominations))),
  ) %>%
  select(-Awards, -oscar_wins, -other_wins, -oscar_nominations, -other_nominations) %>%  # Remove intermediate columns
  ungroup() # Ungroup after rowwise operations
Show the code
# Create the 'awards' column based on the 'Wins' column
df_final <- df_final %>%
  mutate(Awards = factor(ifelse(Wins > 0, 1, 0), levels = c(0, 1)))

2.4 Integrating Director Gender for Analysis

To explore the potential impact of a director’s gender on a film’s performance in the Bechdel Test, we extended our dataset by merging it with an external table that maps names to gender. The link associated to this data is the following: Gender dataset . This table associates names with specific genders, where:

  • Male = 1

  • Female = 0

  • Unisex = 3

For the purposes of our analysis, we assume these name-gender associations are accurate (e.g., “James” is classified as male). Given that only 101 out of 1,792 records are marked as unisex or have missing gender values, we decided to exclude these records when examining gender’s impact on other variables.

Finally, we recreate a column that combines the director’s first and last name. If the last name is missing, we use only the first name; otherwise, both names are concatenated. This provides a consistent format for the director’s name across the dataset, which we store in the new column Director_Name. We then remove the Name and Last_Name columns to streamline the dataset.

2.5 Converting Bechdel Test Results to Binary Format

We create a binary column, bechdel_binary , to indicate whether each film passed the Bechdel Test, where a “PASS” result is represented as 1 and a “FAIL” result as 0. This binary format allows for easier analysis and statistical modeling.

Show the code
# Adding a column of Bechdel_test_result as binary
df_final$Bechdel_binary <- as.factor(ifelse(df_final$Bechdel_test_result == "PASS", 1, 0))

2.6 Ensuring Correct Variable Types for Exploratory Data Analysis

To prepare for exploratory data analysis, we set appropriate data types for each variable. GenderGenreLanguageCountry_of_OriginBechdel_test_result, and Bechdel_binary are converted to categorical variables, while RevenueImdb_Rating, and Imdb_Votes are transformed to numeric types for accurate calculations.

Variable Type
Year integer
Bechdel_test_result factor
Budget integer
Revenue numeric
Language factor
Movie_Title character
Country_of_Origin factor
Imdb_Rating numeric
Genre factor
Imdb_Votes numeric
Wins numeric
Nominations numeric
Awards factor
Gender factor
score numeric
Director_Name character
Bechdel_binary factor

2.7 Handling Missing Values

After checking for missing values, we find that Revenue, Score and Gender have some NA entries. Since these missing values could impact analysis, we remove rows with any NA values to maintain data integrity in the final dataset.

Show the code
# Count the number of NA values in each column before cleaning
na_counts <- colSums(is.na(df_final))

# Remove rows with NA values
df_final_cleaned <- na.omit(df_final)

# Count the number of non-NA values in each column after cleaning
non_na_counts <- colSums(!is.na(df_final_cleaned))

# Create a summary table
summary_table <- data.frame(
  Variable = names(na_counts),  # Column names
  NA_Before_Cleaning = na_counts,  # NA counts before cleaning
  Non_NA_After_Cleaning = non_na_counts  # Non-NA counts after cleaning
)

# Create a styled table using kable
summary_table %>%
  kable("html", align = "c", col.names = c("Variable", "NA Before Cleaning", "Non-NA After Cleaning"),  row.names = FALSE) %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#0095C8")  # Style header row
Variable NA Before Cleaning Non-NA After Cleaning
Year 0 8212
Bechdel_test_result 0 8212
Budget 0 8212
Revenue 32 8212
Language 0 8212
Movie_Title 0 8212
Country_of_Origin 0 8212
Imdb_Rating 0 8212
Genre 0 8212
Imdb_Votes 0 8212
Wins 0 8212
Nominations 0 8212
Awards 0 8212
Gender 342 8212
score 342 8212
Director_Name 0 8212
Bechdel_binary 0 8212
Show the code
# Remove rows with NA values in df_final
df_final<- na.omit(df_final)

2.8 Variables and Descriptions after the cleaning

Show the code
# Create a data frame to display the variables and their descriptions
variables <- data.frame(
  Variable = c("Year (Release Date)", "Bechdel Test Result (Passed/Failed)", "Budget (in $)", 
               "Revenue (in $)", "Language", "Movie Title", "Country of Origin", 
               "IMDb Ratings", "Genre (Action, Drama, Comedy, etc.)", "IMDb Votes", 
               "Wins", "Nominations", "Award", "Gender (Director’s Gender)", "Director Name", 
               "Bechdel Binary"),
  Description = c("The year when the film was released to the public.",
                  "This variable indicates whether the film passed or failed the Bechdel test, a measure of gender representation in films.",
                  "The production budget of the film in U.S. dollars, adjusted for inflation to reflect 2013 dollar values.",
                  "The total revenue or box office earnings of the film in U.S. dollars, adjusted for inflation to 2013 prices.",
                  "The primary language(s) in which the film was released or broadcast, represented by specific languages such as 'English' or 'French'.",
                  "The name of the film, provided as text.",
                  "The country where the film was produced or primarily distributed, provided as the country’s name (e.g., 'USA', 'France').",
                  "The film’s IMDb rating, often based on user reviews and ratings on the IMDb platform.",
                  "The primary genre(s) describing the film, such as Action, Drama, or Comedy.",
                  "The number of user reviews for the film’s IMDb rating on the IMDb platform.",
                  "The number of awards the film has won (e.g., 'Golden Globe', 'Oscar').",
                  "The number of nominations for awards the film has received.","This variable indicates whether the film won (1) or not (0) an award.",
                  "The gender of the film’s director.",
                  "The name of the director of the film.",
                  "This variable indicates whether the film passed (1) or failed (0) the Bechdel test."),
  Type = c("Integer", "Factor with possible values 'Passed' or 'Failed'.", "Integer",
           "Numeric", "Factor (e.g., 'English', 'French'", "Character", "Factor", "Numeric", 
           "Factor", "Numeric", "Numeric", "Numeric",  "Factor with possible values 'Win = 1' or 'No Win = 0'.", "Factor", "Character",
           "Factor with possible values 'Passed = 1' or 'Failed = 0'.")
)



# Create a styled table with kableExtra
variables %>%
  kable("html", escape = FALSE, caption = "Variables and Descriptions after Cleaning", align = "c") %>%
  kable_styling(full_width = TRUE, position = "center", bootstrap_options = c("striped", "hover", "responsive")) %>%
  column_spec(1, bold = TRUE, color = "white", background = "#0095C8") %>%  # Style the Variable column
  column_spec(2, width = "30em") %>%  # Customize the width for the Description column
  column_spec(3, width = "15em") %>%  # Customize the width for the Type column
  row_spec(0, bold = TRUE, font_size = 14, color = "white", background = "#0095C8") %>%
  add_header_above(c(" " = 1, "Variable Details" = 2))
Variables and Descriptions after Cleaning
Variable Details
Variable Description Type
Year (Release Date) The year when the film was released to the public. Integer
Bechdel Test Result (Passed/Failed) This variable indicates whether the film passed or failed the Bechdel test, a measure of gender representation in films. Factor with possible values 'Passed' or 'Failed'.
Budget (in $) The production budget of the film in U.S. dollars, adjusted for inflation to reflect 2013 dollar values. Integer
Revenue (in $) The total revenue or box office earnings of the film in U.S. dollars, adjusted for inflation to 2013 prices. Numeric
Language The primary language(s) in which the film was released or broadcast, represented by specific languages such as 'English' or 'French'. Factor (e.g., 'English', 'French'
Movie Title The name of the film, provided as text. Character
Country of Origin The country where the film was produced or primarily distributed, provided as the country’s name (e.g., 'USA', 'France'). Factor
IMDb Ratings The film’s IMDb rating, often based on user reviews and ratings on the IMDb platform. Numeric
Genre (Action, Drama, Comedy, etc.) The primary genre(s) describing the film, such as Action, Drama, or Comedy. Factor
IMDb Votes The number of user reviews for the film’s IMDb rating on the IMDb platform. Numeric
Wins The number of awards the film has won (e.g., 'Golden Globe', 'Oscar'). Numeric
Nominations The number of nominations for awards the film has received. Numeric
Award This variable indicates whether the film won (1) or not (0) an award. Factor with possible values 'Win = 1' or 'No Win = 0'.
Gender (Director’s Gender) The gender of the film’s director. Factor
Director Name The name of the director of the film. Character
Bechdel Binary This variable indicates whether the film passed (1) or failed (0) the Bechdel test. Factor with possible values 'Passed = 1' or 'Failed = 0'.

2.9 Summary of Data Cleaning

Key Cleaning Steps:

  • Removed irrelevant columns, standardized formats, and addressed missing data.

  • Identified and managed outliers to improve data reliability.

Dataset Enhancement:

  • Added director gender using external gender-mapping tables.

  • Excluded records with ambiguous or missing gender data for robust analysis.

Significance:

  • Cleaning ensured dataset accuracy for meaningful exploratory and statistical analyses.

  • Prepared the foundation for examining gender representation and its impact on film success.

3. Exploratory Data Analysis

This exploratory analysis aims to uncover relationships between female representation in films, as measured by the Bechdel test, and their commercial success as indicated by revenue and awards. By visualizing the data and assessing correlations among these variables, we can gain insights into the impact of diversity in film on its critical and financial performance.

3.1 General Summary of the Data

  1. Creating a Deduplicated Dataset for Analysis
    In this step, we create a deduplicated dataset based on unique film titles. This dataset will be used for analysis in all columns except for Genre and Language. By grouping the data by Movie_Title and selecting the first occurrence of each variable, we ensure that only one entry per film is considered for analysis. We then summarize the dataset to count the number of distinct values in each column, providing an overview of the diversity within the data.
Show the code
# Create a deduplicated dataset based on unique film titles
df_unique <- df_final %>% 
  group_by(Movie_Title) %>% 
  summarise(across(everything(), ~ first(.)))

# Summarize the number of distinct values for each column
summary_data <- df_unique %>%
  summarise(across(everything(), ~ n_distinct(.)))

# Convert the summary data to an interactive table using DT
summary_data_table <- datatable(summary_data, options = list(pageLength = 5))

# Print the interactive table
summary_data_table
  1. Summarizing Categorical Variables
    In this step, we summarize the categorical variables, including Bechdel_test_result, Genre, Gender, and Bechdel_binary, by counting the occurrences of each unique category. This provides an overview of the distribution of these variables in the dataset, which is essential for understanding their role in the analysis.
Show the code
# Summarize the Bechdel test result, Genre, and Gender with counts
bechdel_test_summary <- df_unique %>%
  count(Bechdel_test_result, name = "count") %>%
  rename(Category = Bechdel_test_result) %>%
  mutate(Variable = "Bechdel_test_result") # Add the variable name

genre_summary <- df_unique %>%
  count(Genre, name = "count") %>%
  rename(Category = Genre) %>%
  mutate(Variable = "Genre of the film") # Add the variable name

gender_summary <- df_unique %>%
  count(Gender, name = "count") %>%
  rename(Category = Gender) %>%
  mutate(Variable = "Gender of Directors") # Add the variable name

# Create interactive tables with DT
bechdel_test_table <- datatable(bechdel_test_summary, options = list(pageLength = 5))
genre_summary_table <- datatable(genre_summary, options = list(pageLength = 5))
gender_summary_table <- datatable(gender_summary, options = list(pageLength = 5))

# Print the interactive tables
bechdel_test_table
Show the code
genre_summary_table
Show the code
gender_summary_table
  1. Summarizing Numerical Variables
    In this step, we summarize the key numerical columns, including Budget, Revenue, Imdb_Rating, Imdb_Votes, Wins, and Nominations. This summary provides descriptive statistics for these variables, offering insights into their distribution and range, which are essential for understanding their role in the analysis of film performance.
Show the code
# Summarize the numerical columns
numerical_summary <- summary(df_unique[, c("Budget", "Revenue", "Imdb_Rating", "Imdb_Votes", "Wins", "Nominations")])

# Convert the summary into a data frame for easier viewing
numerical_summary_df <- as.data.frame(numerical_summary)

# Convert the numerical summary data to an interactive table using DT
numerical_summary_table <- datatable(numerical_summary_df, options = list(pageLength = 6))

# Print the interactive table
numerical_summary_table

3.2 Correlation Heatmap

In this step, we present a correlation heat-map that displays the relationships between all numeric and factor variables: Year, Revenue, Nominations, Imdb_Votes, Imdb_Rating, Budget, Bechdel_binary and Awards. By examining the correlation coefficients between these variables, this heatmap provides insights into the degree and direction of association among financial, critical, and award-related metrics. Positive correlations indicate that as one variable increases, the other tends to increase as well, while negative correlations suggest an inverse relationship. This visualization serves as a preliminary analysis, helping us identify which factors are most closely linked, and providing a basis for further exploration of the economic and critical impacts of female representation in films.

Show the code
# Select all numeric columns including Bechdel_binary (which has values 0 and 1)
num_cols <- df_unique %>% 
  select(Year, Revenue, Awards, Imdb_Votes, Budget, Imdb_Rating, Nominations, Bechdel_binary, Gender)  %>%
  mutate(across(everything(), as.numeric))

# Calculate the correlation matrix with complete observations only
corr_matrix <- cor(num_cols, use = "complete.obs")

# Convert correlation matrix to long format for ggplot
corr_long <- corr_matrix %>%
  as.data.frame() %>%
  rownames_to_column(var = "Var1") %>%
  pivot_longer(cols = -Var1, names_to = "Var2", values_to = "value")

# Create the heatmap with correlation values displayed on the tiles
heatmap <- ggplot(corr_long, aes(x = Var1, y = Var2, fill = value)) +
  geom_tile(color = "white") +
  scale_fill_gradient2(low = "blue", high = "hotpink2", mid = "white", midpoint = 0, limit = c(-1, 1)) +
  geom_text(aes(label = round(value, 2)), color = "black", size = 4) +  # Display correlation values
  labs(title = "Correlation Heatmap", 
       x = "", y = "", fill = "Correlation") +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5),  # Center the title
    axis.text.x = element_text(angle = 45, hjust = 1)
  )

# Make the heatmap interactive with Plotly
ggplotly(heatmap)

Interpretation

  • Key Observations:

    • Awards are moderately correlated with nominations (0.32) and IMDb ratings (0.35), suggesting that higher-rated movies or those with more nominations often win more awards.

    • Bechdel Test Binary (Bechdel_binary) shows almost no correlation with awards (-0.02) or IMDb ratings (-0.13). This indicates that passing the test alone does not strongly influence awards or ratings.

    • Revenue and Budget show a strong positive correlation (0.6), as expected in the film industry.

    • IMDb ratings are positively correlated with IMDb votes (0.56), implying popular movies often receive better ratings.

While there is no direct relationship between passing the Bechdel Test and awards or ratings, movies with higher IMDb ratings and more nominations tend to perform better in terms of awards. The Bechdel Test result might not directly impact these metrics but could be indirectly linked to other qualitative factors.

3.3 Revenue Distribution by Bechdel Test Outcome

In this step, we examine the distribution of movie revenues based on whether films pass or fail the Bechdel Test. Using a violin plot overlaid with boxplots, we visualize the log-transformed revenue to handle any large variances in revenue data, which allows us to better observe patterns across Bechdel Test outcomes. This visualization helps us assess whether movies that pass the Bechdel Test tend to have different revenue distributions compared to those that fail, providing preliminary insights into the financial impact of female representation in films.

Show the code
# Check for any missing or NA values in the Revenue column to ensure data integrity
df_unique <- df_unique %>% drop_na(Revenue)

# Create the interactive plot with specified colors
plot <- ggplot(df_unique, aes(x = factor(Bechdel_binary), y = log(Revenue), fill = factor(Bechdel_binary))) +
  geom_violin(alpha = 0.7) +
  geom_boxplot(width = 0.2, alpha = 0.8, outlier.shape = NA) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3"), labels = c("Fail", "Pass")) +
  scale_x_discrete(labels = c("0" = "Fail", "1" = "Pass")) +
  labs(
    title = "Movie Revenue Distribution by Bechdel Test Result",
    subtitle = "Log of Revenue",
    x = "Bechdel Test Result",
    y = "Revenue (Log Scale)",
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold", size = 14),
    plot.subtitle = element_text(hjust = 0.5, size = 10),
    legend.position = "bottom",
    axis.text = element_text(size = 10),
    axis.title = element_text(size = 12)
  )


ggplotly(plot)

Interpretation

According this violin plot that illustrates the revenue distribution for films based on their Bechdel Test results. Films that fail the Bechdel Test generally show a higher median revenue compared to those that pass. Additionally, the revenue distribution for failing films has greater variability, with some reaching notably high revenues, while others fall to lower extremes, as shown by the extended tails of the violin plot. In contrast, films that pass the Bechdel Test have a more condensed revenue distribution, indicating less variability and a slightly lower median revenue.

Overall, this suggests that films failing the Bechdel Test may achieve higher revenues on average, though the reasons behind this trend likely involve other factors, such as genre or marketing, which would require further analysis to clarify. Tho the ANOVA test shows that the difference isn’t significative.

Anova Analysis

Show the code
# Hypothesis test: ANOVA
anova_test <- aov(Revenue ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary <- summary(anova_test)
print(anova_summary)
                                 Df    Sum Sq   Mean Sq F value   Pr(>F)    
as.factor(Bechdel_test_result)    1 1.270e+18 1.270e+18   15.51 8.53e-05 ***
Residuals                      1700 1.392e+20 8.188e+16                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Show the code
# Interpretation of ANOVA results
if (anova_summary[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates that there is a statistically significant difference in revenue between the Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in revenue between the Bechdel Test groups.\n")
}
The ANOVA test indicates that there is a statistically significant difference in revenue between the Bechdel Test groups.

3.4 Revenue Distribution by Genre and Bechdel Test Outcome

In this section we use a boxplot that compares film revenues across different genres, with results segmented by whether the films pass or fail the Bechdel Test.

Show the code
# interactive plot
plot <- ggplot(df_final, aes(x = Genre, y = Revenue, fill = factor(Bechdel_binary))) +
  geom_boxplot(outlier.shape = NA, alpha = 0.8) +  # Set transparency for better visibility
  scale_y_log10() +  # Log scale to handle revenue variability
  labs(
    title = "Revenue Distribution by Genre and Bechdel Test Result",
    subtitle = "Comparing Revenue Across Genres by Bechdel Test Outcome",
    x = "Genre", 
    y = "Revenue (Log Scale)", 
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3"),  # Orange for Fail, Green for Pass
                    labels = c("Fail", "Pass")) +
  theme_minimal() + 
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold", size = 14),  # Centered title
    plot.subtitle = element_text(hjust = 0.5, size = 10),  # Centered subtitle
    axis.text.x = element_text(angle = 45, hjust = 1, size = 10),  # Rotate genre labels
    axis.title = element_text(size = 12),
    legend.position = "bottom"  # Move legend to bottom for more space
  )

# Convert to interactive plot
ggplotly(plot)

Interpretation

The plot suggests that while revenue varies significantly across genres, the Bechdel Test result does not have a consistent impact on revenue within each genre. Certain genres like Adventure, Sci-Fi, and Action show generally higher revenues, but this trend appears irrespective of the Bechdel Test outcome.

3.5 Revenue vs. IMDb Rating Scatter Plot with Bechdel Test Outcome

This scatter plot visualization provides insight into the relationship between a film’s IMDb rating and its revenue, while highlighting the results of the Bechdel Test as a key variable. It aims to observe any trends in rating and revenue associated with gender representation. A smooth trend line added to the data helps to highlight overarching patterns, while a logarithmic scale on the revenue axis accounts for the large revenue disparities often found across films.

Show the code
# Your ggplot code
p <- ggplot(df_unique, aes(x = Imdb_Rating, y = Revenue, color = factor(Bechdel_binary))) +
  geom_point(alpha = 0.6) +
  geom_smooth(method = "loess", se = FALSE) +  # Add trend lines without confidence intervals
  scale_y_log10() + 
  scale_color_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +  # Set colors for Bechdel_binary
  labs(title = "Revenue vs. IMDb Rating by Bechdel Test Result",
       x = "IMDb Rating", y = "Log of Revenue", color = "Bechdel Test Result\n(0 = Fail, 1 = Pass)") +
  theme_minimal()

ggplotly(p)
`geom_smooth()` using formula = 'y ~ x'

Interpretation

Passing the Bechdel Test does not appear to have a major impact on revenue, as both passing and failing movies follow similar trends in terms of IMDb Rating and Revenue. Instead, IMDb rating itself seems to be the stronger indicator of revenue potential across both groups, though this effect is relatively modest

3.6 Wins by Bechdel Test Result

Show the code
# Using dplyr to create summary statistics
summary_stats <- df_unique %>%
  group_by(Bechdel_binary) %>%
  summarise(
    Mean_Wins = mean(Wins, na.rm = TRUE),
    Median_Wins = median(Wins, na.rm = TRUE),
    Count = n()
  ) %>%
  mutate(
    Mean_Wins = round(Mean_Wins, 2),
    Median_Wins = round(Median_Wins, 2)
  )

summary_stats
# A tibble: 2 × 4
  Bechdel_binary Mean_Wins Median_Wins Count
  <fct>              <dbl>       <dbl> <int>
1 0                   8.94           3   948
2 1                   8.81           3   754

Interpretation

We see that failing the test is more common. The average number of win remains the same but the change is that 50% of films that passed the test had at least 4 win awards and for those failing the test, 50% of them had at least 3 win awards.

3.7 Awards by Bechdel Test Result

Interpretation:

Passing the Bechdel Test does not seem to be a strong indicator of receiving awards, as the difference in median awards is minimal. However, movies passing the test have a slightly broader range of awards.

Awards: Chi-Square Test for Independence

This test evaluates whether the distribution of Awards (binary) differs by Bechdel Test Result

Show the code
# Create a contingency table for awards and Bechdel_test_result
contingency_table <- table(df_unique$Awards, df_unique$Bechdel_test_result)

# Perform Chi-square test for independence
chi_square_test <- chisq.test(contingency_table)
print(chi_square_test)

    Pearson's Chi-squared test with Yates' continuity correction

data:  contingency_table
X-squared = 0.36961, df = 1, p-value = 0.5432
Show the code
# Interpretation of Chi-Square results
if (chi_square_test$p.value < 0.05) {
  cat("The Chi-square test indicates a statistically significant relationship between Bechdel Test results and awards.\n")
} else {
  cat("The Chi-square test suggests no statistically significant relationship between Bechdel Test results and awards.\n")
}
The Chi-square test suggests no statistically significant relationship between Bechdel Test results and awards.

3.8 Nominations by Bechdel Test Result

Show the code
library(ggplot2)
library(plotly)
# Create the interactive plot for Nominations
plot_nominations <- ggplot(df_unique, aes(x = Bechdel_binary, y = Nominations, fill = Bechdel_binary)) +
  geom_boxplot(outlier.shape = NA) +
  labs(title = "Nominations by Bechdel Test Result",
       x = "Bechdel Test Result", 
       y = "Number of Nominations",
       fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)") +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5)) +
  ylim(0, 50) +  # Adjust y-axis limits for Nominations
  # Add text annotation with statistics
  annotate("text", 
           x = 1:2, 
           y = 50,  # Position the text at the top of the y-axis
           label = paste("Mean:", round(tapply(df_final$Nominations, df_final$Bechdel_binary, mean, na.rm = TRUE), 2),
                         "\nMedian:", round(tapply(df_final$Nominations, df_final$Bechdel_binary, median, na.rm = TRUE), 2)),
           vjust = -0.5)

# Convert ggplot to interactive plotly
ggplotly(plot_nominations)
Warning: Removed 90 rows containing non-finite outside the scale range
(`stat_boxplot()`).

Interpretation : Movies that pass the Bechdel Test and those that fail have nearly identical mean and median nominations, indicating no significant difference in recognition between the two groups. Both groups show a similar spread of nominations, with numerous outliers representing highly nominated movies.

Anova Analysis

Show the code
# ANOVA for Nomiantions by Bechdel_test_result
anova_Nominations <- aov(Nominations ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary_nominations <- summary(anova_Nominations)
print(anova_summary_nominations)
                                 Df Sum Sq Mean Sq F value Pr(>F)
as.factor(Bechdel_test_result)    1      3    2.58   0.008  0.927
Residuals                      1700 518305  304.89               
Show the code
# Interpretation of ANOVA results for IMDb ratings
if (anova_summary_nominations[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates a statistically significant difference in Nominations between Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in Nominations between Bechdel Test groups.\n")
}
The ANOVA test suggests no statistically significant difference in Nominations between Bechdel Test groups.

3.9 IMDb Ratings by Bechdel Test Result

Show the code
# Create the interactive plot
plot <- ggplot(df_unique, aes(x = factor(Bechdel_binary), y = Imdb_Rating, fill = factor(Bechdel_binary))) +
  geom_boxplot(outlier.shape = NA) +
  labs(title = "IMDb Ratings by Bechdel Test Result",
       x = "Bechdel Test Result", y = "IMDb Rating",  fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)") +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +
  theme_minimal() + 
  theme(plot.title = element_text(hjust = 0.5))

ggplotly(plot)

Interpretation:

Movies that pass the Bechdel Test tend to have marginally better IMDb ratings, indicating a potential audience or critical preference for movies meeting the criteria.

Anova : This test checks if the mean IMDb ratings differ significantly by Bechdel_test_result.

Show the code
# ANOVA for IMDb ratings by Bechdel_test_result
anova_imdb <- aov(Imdb_Rating ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary_imdb <- summary(anova_imdb)
print(anova_summary_imdb)
                                 Df Sum Sq Mean Sq F value   Pr(>F)    
as.factor(Bechdel_test_result)    1   27.4  27.360   30.85 3.23e-08 ***
Residuals                      1700 1507.8   0.887                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Show the code
# Interpretation of ANOVA results for IMDb ratings
if (anova_summary_imdb[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates a statistically significant difference in IMDb ratings between Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in IMDb ratings between Bechdel Test groups.\n")
}
The ANOVA test indicates a statistically significant difference in IMDb ratings between Bechdel Test groups.

3.10 Director’s gender impact

This section will examine how the director’s gender influences various aspects of the data, including budget, revenue, IMDb score, and the Bechdel test results.

But first we need to create a duplicate of df_unique that only contains the variables where the director’s gender is identify as female or male. So we need to remove the unisex (3) value.

Show the code
# Create a new dataframe with only Gender 0 and 1
df_gender <- df_unique %>% 
  filter(Gender %in% c(0, 1))

# Display the first few rows to check the result
# head(df_gender)

df_gender <- df_gender %>%
  mutate(Director_gender = ifelse(Gender == 1, "Male", "Female"))

Interpretation

In our dataset, only 7% of movies were directed by female directors, highlighting a significant gender disparity in the film industry. This chapter aims to examine whether this underrepresentation correlates with differences in other aspects of filmmaking.

We will analyze various factors including budget, revenue, genre, and critical success (measured by IMDb ratings) in relation to the director’s gender. Finally, we will explore the connection between female representation behind the camera (indicated by the director’s gender) and female representation on screen, using the Bechdel test as a measure.

The objective is to assess the broader impact of director gender on both the production and success of a movie and portrayal of gender in film.

3.10.1 The Director’s gender impact on budget

Interpretation

This bloxplot shows that male directors get higher budget than the female counterparts.

In practical terms, this finding highlights a disparity in financial support for movies based on the director’s gender, with female directors receiving, on average, smaller budgets than male directors.

3.10.2 The Director’s gender impact on Revenue

Show the code
# Assuming df_gender contains the Revenue and Director_gender columns
boxplot <- ggplot(df_gender, aes(x = as.factor(Director_gender), y = Revenue, fill = Director_gender)) +
  geom_boxplot(outlier.color = "red", outlier.shape = 16, alpha = 0.7) +
  labs(
    x = "Director Gender",
    y = " Log Revenue ",
    title = "Revenue Distribution by Director Gender (Logarithmic Scale)"
   
  ) +
  scale_y_log10() + # Apply logarithmic scale
  scale_y_log10() + # Apply logarithmic scale
  scale_fill_manual(values = c(
    "Female" = "#DB9ADB",
    "Male" = "#4062DB"
  )) +
  theme_minimal()
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
Show the code
# Convert the plot to an interactive plot
interactive_boxplot <- ggplotly(boxplot)
interactive_boxplot <- ggplotly(boxplot)

# Display the interactive box plot
interactive_boxplot

Interpretation

The bar plot reveals a substantial disparity in movie revenues between male and female directors, indicating that films directed by women generate, on average, about half the revenue of those directed by men. This significant difference suggests that deeper industry trends and potential biases in resource allocation, marketing, or genre assignment may be affecting box office performance.

In examining the revenue disparity, we observe that the mean revenue for movies directed by male directors is notably higher than that for female-directed films. This discrepancy means that, on average, films helmed by men achieve considerably more financial success in terms of revenue. The bar plot provides a clear visual reinforcement of this difference, showing that the financial gap is considerable.

This revenue gap may perpetuate a cycle in which studios and investors view female directors as less profitable, thus influencing future funding, directing opportunities, and career advancement for women in the industry. This disparity in revenue also reflects structural challenges to achieving gender equity in filmmaking, where the perceived financial success of male-directed films may reinforce biases that favor male directors for large-scale projects.

3.10.3 The Director’s gender impact on Critical success

Show the code
plot <- ggplot(
  data = df_gender,
  mapping = aes(x = Director_gender, y = Imdb_Rating, fill = Director_gender)
) +
  geom_boxplot(outlier.shape = NA) +  # Hide outliers if they clutter the plot
  scale_fill_manual(values = c("Female" = "#DB9ADB", "Male" = "#4062DB")) +  # Color for male (0) and female (1)
  labs(
    title = "IMDb ratings by Director Gender",
    x = "Director's Gender",
    y = "Imdb Ratings",
    fill = "Gender"
  ) +
  theme_minimal()

# Convert the plot to an interactive plot
interactive_plot <- ggplotly(plot)

# Display the interactive plot
interactive_plot

Interpretation

According to this graph female directors tend to have a narrower range of IMDb Ratings with fewer extreme outliers, while male directors show a wider distribution with several lower-rated outliers. On average, both groups seem to center around similar median IMDb Ratings, though male-directed movies exhibit greater variability.

3.10.4 The Director’s gender impact on the Bechdel test

Show the code
# Calculate counts and percentages by Gender and Bechdel Test result
data_gender_bechdel <- df_gender %>%
  group_by(Director_gender, Bechdel_binary) %>%
  summarize(count = n(), .groups = "drop") %>%
  group_by(Director_gender) %>%
  mutate(percentage = count / sum(count) * 100)

# Plot
plot <- ggplot(data_gender_bechdel, aes(x = as.factor(Director_gender), y = count, fill = as.factor(Bechdel_binary)))  +
  geom_bar(stat = "identity", width = 0.5, position = "fill") +  # Use position = "fill" for percentage stack
  labs(
    x = "Director Gender",  # Label for x-axis
    y = "Percentage of Movies",                    # Label for y-axis
    title = "Percentage of Films Passing the Bechdel Test by Director Gender",
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +  # Customize colors for pass/fail
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5),
    axis.text.x = element_text(size = 10),
    axis.text.y = element_text(size = 10)
  ) +
  geom_text(
    aes(label = paste0(round(percentage, 1), "%")),
    position = position_fill(vjust = 0.5),  # Center text within each stack
    color = "white",
    size = 3
  )

# Convert the plot to an interactive plot
interactive_plot <- ggplotly(plot)

# Display the interactive plot
interactive_plot

Unsurprisingly, female directors are better in passing Bechdel test.

Show the code
# Count Bechdel_binary values grouped by Gender
counts <- df_unique %>%
  group_by(Gender, Bechdel_binary) %>%
  summarise(count = n(), .groups = 'drop') %>%
  mutate(
    Gender_desc = case_when(
      Gender == 0 ~ "Female",
      Gender == 1 ~ "Male",
      Gender == 3 ~ "Unisex"
    ),
    Bechdel_binary_desc = ifelse(Bechdel_binary == 0, "Fail", "Pass")
  ) %>%
  select(Gender_desc, Bechdel_binary_desc, count)  # Select only the semantic columns

# Display the results with semantic descriptions on the left 
# print(counts)
Show the code
# Create a formatted table with gt
counts_table <- counts %>%
  gt() %>%
  tab_header(
    title = "Bechdel Test Results by Director Gender"
  ) %>%
  cols_label(
    Gender_desc = "Director Gender",
    Bechdel_binary_desc = "Bechdel Test Result",
    count = "Count"
  ) %>%
  fmt_number(
    columns = c(count),
    decimals = 0  # No decimals for count
  ) %>%
  tab_style(
    style = cell_text(weight = "bold"),
    locations = cells_column_labels()
  )

# Display the table
counts_table
Bechdel Test Results by Director Gender
Director Gender Bechdel Test Result Count
Female Fail 23
Female Pass 90
Male Fail 878
Male Pass 615
Unisex Fail 47
Unisex Pass 49

Interpretation

The identity of a movie’s director significantly impacts nearly every aspect of the film, from its budget to its financial and critical success. However, who directs a movie also influences the type of story that gets told. Female directors tend to represent women more authentically on screen, as shown by the fact that 80% of movies directed by women pass the Bechdel Test. This test, which measures the representation of female characters through the presence of meaningful dialogue between women, highlights an important difference in storytelling based on the director’s gender.

In contrast, for movies directed by men, the pass rate for the Bechdel Test is much closer to a 50-50 split, suggesting a less consistent focus on female representation. This disparity indicates that women behind the camera may be more intentional in depicting diverse female experiences and narratives, while male-directed films are less likely to prioritize these aspects. Given that men direct 93% of all movies, this lack of emphasis on female representation has a profound impact on the industry. If the sample we have is a reasonable representation of the broader industry, this overwhelming majority means that stories lacking meaningful female perspectives remain the norm, shaping the cultural landscape and the types of narratives that audiences are exposed to.

Ultimately, the director’s gender shapes not only the film’s production and success but also the depth and authenticity of female representation within the story itself.

3.10.5 Trend Analysis Over Time (Percentage of Movies Passing Bechdel Test)

Show the code
# Filter out the year 1970
df_filtered <- df_unique %>%
  filter(Year != 1970)

# Calculate the percentage of movies passing the Bechdel test by year
df_trend <- df_filtered %>%
  group_by(Year) %>%
  summarize(pass_rate = mean(Bechdel_binary == 1, na.rm = TRUE) * 100)

# Create the interactive plot
plot <- ggplot(df_trend, aes(x = Year, y = pass_rate)) +
  geom_line(color = "#0095C8") +
  geom_point(color = "#0095C8") +
  labs(title = "Percentage of Movies Passing the Bechdel Test Over Time",
       x = "Year", y = "Percentage Passing Bechdel Test") +
  scale_y_continuous(limits = c(0, 100), labels = scales::percent_format(scale = 1)) +
  theme_minimal() + 
  theme(plot.title = element_text(hjust = 0.5))

ggplotly(plot)

This final graph shows that the percentage of films passing the Bechdel Test hasn’t increased over time, despite growing calls for better representation. In fact, female representation in movies was stronger in 1997 than in 2013. This suggests that, even with more awareness and discussions about diversity, the film industry has not made significant progress in improving meaningful female representation on screen. In the code we removed the 1970 we did not have relevant data about that year (Information on only one movie).

3.10.6 Summary of Exploratory Data Analysis

Bechdel Test Impact:

  • Films passing the test have higher median revenue and awards, especially in Drama and Romance genres.

  • Action and Adventure genres show high revenues regardless of test results.

Audience & Revenue:

  • Higher IMDb ratings correlate with higher revenues, particularly for films passing the Bechdel Test.

Gender Disparities:

  • Male directors dominate, but female-directed films pass the Bechdel Test more often and achieve strong critical success.

  • Female-directed films have slightly lower median revenues, reflecting systemic challenges.

Language Trends:

  • English-language films dominate revenue; non-English films excel in awards.

Key Insight:

  • Diversity in representation boosts critical and financial success, despite disparities in gender and language.

4. Analysis

In the analysis phase, we aim to applie statistical models to investigate the relationships between passing the Bechdel Test and various film performance metrics. Specifically, our focus is understanding if passing the Bechdel Test significantly correlates with higher revenue, more award wins, and improved IMDb ratings. Furthermore, we want to create predictive models for estimating a film’s likelihood of passing the Bechdel Test based on features like budget, genre, and director.

4.1 General Analysis

First, let’s study the relationship between the Bechdel Test and all of the various performance metrics.

Show the code
# Build the logistic regression model
logit_model <- glm(Bechdel_binary ~  Budget + 
                      + Imdb_Rating + Imdb_Votes + Genre + Wins + 
                     Nominations + Director_gender + Revenue ,
                   family = binomial(link = "logit"), data = df_gender)

# Extract and format the model summary
# Extract and format the model summary
logit_summary <- tidy(logit_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    StdError = std.error, 
    `z-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )


# Display results in a styled table
logit_summary %>%
  kable("html", caption = "Logistic Regression Results") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover"))
Logistic Regression Results
Term Estimate StdError z-value p-value Significant
(Intercept) 2.6707793 0.5534602 4.8256036 0.0000014 Yes
Budget 0.0000000 0.0000000 -1.9908244 0.0465002 Yes
Imdb_Rating -0.3241209 0.0794382 -4.0801661 0.0000450 Yes
Imdb_Votes -0.0000022 0.0000008 -2.8296791 0.0046595 Yes
GenreAdventure 0.5786305 0.2382584 2.4285838 0.0151579 Yes
GenreAnimation 0.3054943 0.2486960 1.2283849 0.2193025 No
GenreBiography 0.7534261 0.2995413 2.5152663 0.0118942 Yes
GenreComedy 0.9764896 0.1685464 5.7935957 0.0000000 Yes
GenreCrime 0.5618523 0.2601320 2.1598739 0.0307824 Yes
GenreDocumentary -0.3695860 1.2037933 -0.3070178 0.7588298 No
GenreDrama 1.0237772 0.1926911 5.3130485 0.0000001 Yes
GenreFamily 14.6955542 571.0224189 0.0257355 0.9794683 No
GenreFantasy 0.9142716 0.8040013 1.1371520 0.2554748 No
GenreHorror 1.3349601 0.2611798 5.1112688 0.0000003 Yes
GenreMusic 13.4176498 882.7434237 0.0151999 0.9878727 No
GenreMusical 15.0195491 624.1088596 0.0240656 0.9808003 No
GenreMystery -0.6953057 0.8275869 -0.8401603 0.4008185 No
GenreSci-Fi -13.4537212 388.8466240 -0.0345990 0.9723995 No
GenreThriller -0.3911313 1.3748044 -0.2844996 0.7760275 No
GenreWestern -13.1139882 882.7433965 -0.0148559 0.9881471 No
Wins -0.0010719 0.0058230 -0.1840713 0.8539575 No
Nominations 0.0156175 0.0055312 2.8235183 0.0047500 Yes
Director_genderMale -1.3701496 0.2497533 -5.4860109 0.0000000 Yes
Revenue 0.0000000 0.0000000 1.9731782 0.0484753 Yes

Removing the non-significant variables one by one allowed us to build a logistic regression with only significant variables. Those variables are the one that will be studied further down in the analysis.

Show the code
# Build the logistic regression model
logit_model <- glm(Bechdel_binary ~ Budget + 
                      Imdb_Rating + Imdb_Votes + Genre + 
                      Nominations + Director_gender,
                   family = binomial(link = "logit"), data = df_gender)

# Extract meaningful results and filter significant rows
logit_summary <- tidy(logit_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    StdError = std.error, 
    `z-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )

# Print as a nice table
logit_summary %>%
  kable("html", caption = "Significant Logistic Regression Results") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover"))
Significant Logistic Regression Results
Term Estimate StdError z-value p-value Significant
(Intercept) 2.6417196 0.5523976 4.7822797 0.0000017 Yes
Budget 0.0000000 0.0000000 -1.2787502 0.2009850 No
Imdb_Rating -0.3227408 0.0792609 -4.0718778 0.0000466 Yes
Imdb_Votes -0.0000017 0.0000007 -2.3975567 0.0165048 Yes
GenreAdventure 0.6227052 0.2367146 2.6306154 0.0085230 Yes
GenreAnimation 0.3501365 0.2474616 1.4149121 0.1570943 No
GenreBiography 0.7261264 0.2981515 2.4354279 0.0148742 Yes
GenreComedy 0.9874954 0.1685778 5.8578018 0.0000000 Yes
GenreCrime 0.5296488 0.2589643 2.0452582 0.0408294 Yes
GenreDocumentary -0.3680775 1.2035837 -0.3058180 0.7597432 No
GenreDrama 1.0132170 0.1921253 5.2737310 0.0000001 Yes
GenreFamily 14.6967788 572.0349824 0.0256921 0.9795029 No
GenreFantasy 0.9004584 0.8036980 1.1203939 0.2625459 No
GenreHorror 1.3711709 0.2606138 5.2613136 0.0000001 Yes
GenreMusic 13.3697779 882.7434234 0.0151457 0.9879159 No
GenreMusical 15.4429477 613.9012925 0.0251554 0.9799310 No
GenreMystery -0.7034555 0.8256845 -0.8519665 0.3942327 No
GenreSci-Fi -13.4882494 388.8728949 -0.0346855 0.9723305 No
GenreThriller -0.4206701 1.3651503 -0.3081493 0.7579688 No
GenreWestern -13.1586566 882.7433957 -0.0149065 0.9881067 No
Nominations 0.0152678 0.0039543 3.8610356 0.0001129 Yes
Director_genderMale -1.3805752 0.2496268 -5.5305569 0.0000000 Yes

The logistic regression analysis identified Budget, IMDb Rating, IMDb Votes, Nominations, and Director Gender as statistically significant predictors of whether a movie passes the Bechdel test. These variables will be the focus of further analysis, as their significance suggests they play an important role in determining Bechdel test outcomes. Non-significant variables were excluded to streamline the model and focus on factors with the most meaningful impact.

4.2 Analysis per Research Question

4.2.1 Is there a significant correlation between passing the Bechdel Test and a film’s revenue?

This analysis investigates whether there is a meaningful relationship between a film’s performance on the Bechdel Test and its revenue. Since revenue reflects a movie’s commercial success, identifying any association with Bechdel Test outcomes can help understand whether films with better gender representation are financially viable.

The following code performs a Pearson correlation test to determine if there is a statistically significant relationship between Bechdel_test_Result and Revenue.

Show the code
# Convert columns to numeric if necessary
df_unique$Bechdel_test_result <- as.numeric(df_unique$Bechdel_test_result)
df_unique$Revenue <- as.numeric(df_unique$Revenue)

# Perform correlation test again
correlation_test <- cor.test(df_unique$Bechdel_test_result, df_unique$Revenue, method = "pearson")
print(correlation_test)

    Pearson's product-moment correlation

data:  df_unique$Bechdel_test_result and df_unique$Revenue
t = -3.9385, df = 1700, p-value = 8.532e-05
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.14196204 -0.04779078
sample estimates:
        cor 
-0.09508915 

The Pearson correlation test between Bechdel_test_result and Revenue yielded a correlation coefficient of approximately -0.095, with a p-value of 8.532e-05. This result indicates a small but statistically significant negative correlation between passing the Bechdel Test and revenue. The 95% confidence interval for this correlation ranges from -0.141 to -0.048, suggesting that the true correlation is likely weakly negative.

Key Findings:

  • Correlation Value: The correlation coefficient of -0.095 implies a weak inverse relationship, where films that pass the Bechdel Test tend to have slightly lower revenues on average. However, given the small magnitude of this correlation, the effect is minor.

  • Statistical Significance: The p-value (< 0.0001) shows that this negative correlation is statistically significant, meaning it is unlikely to be due to random chance.

Conclusion:

While there is a statistically significant relationship between passing the Bechdel Test and revenue, the effect size is minimal, suggesting that passing the test is not a strong predictor of a film’s financial performance. This finding implies that other factors (such as budget, genre, and marketing) likely play a much more substantial role in determining a film’s revenue than its performance on the Bechdel Test.

4.2.2 Do films that pass the Bechdel Test tend to win more awards or receive higher IMDb ratings?

This analysis explores whether better female representation in films, as measured by the Bechdel Test, is associated with higher critical acclaim. IMDb ratings, nominations, and awards are used as metrics to evaluate public and critical perceptions of a film’s success. While IMDb ratings and nominations are continuous variables, awards are binary (0 or 1), requiring different statistical approaches. By examining these relationships, this study aims to shed light on the potential impact of gender diversity on a film’s recognition and audience reception.

In this section we will create some models to help us determine if passing the Bechdel Test is a predictor of critical acclaim. We will use a logistic regression for award model and The imdb_rating_model uses linear regression to estimate IMDb rating as a continuous variable

Logistic Regression Model for Awards

Show the code
# Fit the logistic regression model
award_model <- glm(Awards ~ Bechdel_test_result + Budget + Genre + Imdb_Rating, 
                   data = df_unique, 
                   family = binomial)

# Extract and format the model summary
logistic_summary <- tidy(award_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    `Std. Error` = std.error, 
    `t-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )


# Extract additional model statistics (Residual Deviance and AIC)
residual_deviance <- round(summary(award_model)$deviance, 2)
aic <- round(AIC(award_model), 2)

# Add additional statistics to the summary table with consistent data types
extra_rows <- tibble(
  Term = c("Residual Deviance", "AIC"),
  Estimate = c(residual_deviance, aic),
  `Std. Error` = c(NA_real_, NA_real_),  # Use NA_real_ for missing numeric values
  `t-value` = c(NA_real_, NA_real_),
  `p-value` = c(NA_real_, NA_real_),
  Significant = c(NA_character_, NA_character_)  # Use NA_character_ for missing character values
)

# Combine the model summary with the additional rows
logistic_summary <- bind_rows(logistic_summary, extra_rows)

# Display the summary table
logistic_summary %>%
  mutate(across(where(is.numeric), ~ round(., 2)), # Round all numeric values to 2 decimals
         across(everything(), ~ ifelse(is.na(.), "", .))) %>%  # Replace NA with empty strings for display
  kable("html", caption = "Logisitc Regression Results for Awards") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover", "condensed")) %>%
  column_spec(1, bold = TRUE) %>%
  column_spec(2:6, color = "darkblue")
Logisitc Regression Results for Awards
Term Estimate Std. Error t-value p-value Significant
(Intercept) -6.12 0.6 -10.24 0 Yes
Bechdel_test_result 0.18 0.14 1.28 0.2 No
Budget 0.00 0 6.51 0 Yes
GenreAdventure 0.14 0.29 0.48 0.63 No
GenreAnimation 0.44 0.32 1.36 0.17 No
GenreBiography 2.21 0.74 3 0 Yes
GenreComedy 0.39 0.18 2.12 0.03 Yes
GenreCrime 0.40 0.31 1.29 0.2 No
GenreDocumentary 0.00 1.15 0 1 No
GenreDrama 1.00 0.24 4.16 0 Yes
GenreFamily -0.24 1.43 -0.17 0.87 No
GenreFantasy 0.85 0.84 1.02 0.31 No
GenreHorror 0.52 0.29 1.81 0.07 No
GenreMusic 15.44 882.74 0.02 0.99 No
GenreMusical 13.90 608.3 0.02 0.98 No
GenreMystery -0.61 0.62 -0.99 0.32 No
GenreSci-Fi -0.54 0.94 -0.58 0.56 No
GenreThriller -1.70 1.61 -1.05 0.29 No
GenreWestern -16.83 882.74 -0.02 0.98 No
Imdb_Rating 0.94 0.08 11.96 0 Yes
Residual Deviance 1491.05
AIC 1531.05

The logistic regression model predicts the likelihood of a film winning at least one award based on its Bechdel Test result, budget, and genre.

Key Findings:

  • Budget: Strong positive and statistically significant impact (p<0.001). Higher budgets increase the likelihood of winning awards.
  • Bechdel Test: Not significant (p=0.44), indicating no direct relationship with award-winning chances in this dataset.
  • Genres:
    • Genres like Animation, Biography, Comedy, Crime, and Drama have significant positive effects on the likelihood of winning awards.

    • Other genres, such as Documentary and Horror, do not show significant effects.

Model Fit:

  • Residual Deviance (1491.05): Lower than null deviance, suggesting that the predictors improve model performance.

  • AIC (1531): Indicates acceptable fit, but the model may not capture all relevant predictors.

Conclusion:

Budget and certain genres, such as Drama, Biography, and Animation, significantly predict the likelihood of a film winning awards. However, passing the Bechdel Test does not appear to enhance a film’s award potential. This suggests that awards are primarily influenced by production investment and genre rather than diversity indicators like the Bechdel Test.

Linear Regression Model for IMDb Ratings

Show the code
# Fit the linear regression model
imdb_rating_model <- lm(Imdb_Rating ~ Bechdel_test_result + Budget + Genre, data = df_unique)

# Extract and format the model summary
linear_summary <- tidy(imdb_rating_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    `Std. Error` = std.error, 
    `t-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )

# Extract additional model statistics (Residual Standard Error and Adjusted R-Squared)
model_stats <- summary(imdb_rating_model)
residual_se <- round(model_stats$sigma, 2)
adj_r_squared <- round(model_stats$adj.r.squared, 2)

# Add additional statistics to the summary table with consistent data types
extra_rows <- tibble(
  Term = c("Residual Standard Error", "Adjusted R-Squared"),
  Estimate = c(residual_se, adj_r_squared),
  `Std. Error` = c(NA_real_, NA_real_),  # Use NA_real_ for missing numeric values
  `t-value` = c(NA_real_, NA_real_),
  `p-value` = c(NA_real_, NA_real_),
  Significant = c(NA_character_, NA_character_)  # Use NA_character_ for missing character values
)

# Combine the model summary with the additional rows
linear_summary <- bind_rows(linear_summary, extra_rows)

# Display the summary table
linear_summary %>%
  mutate(across(where(is.numeric), ~ round(., 2)), # Round all numeric values to 2 decimals
         across(everything(), ~ ifelse(is.na(.), "", .))) %>%  # Replace NA with empty strings for display
  kable("html", caption = "Linear Regression Results for IMDb Ratings") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover", "condensed")) %>%
  column_spec(1, bold = TRUE) %>%
  column_spec(2:6, color = "darkblue")
Linear Regression Results for IMDb Ratings
Term Estimate Std. Error t-value p-value Significant
(Intercept) 6.86 0.08 81.38 0 Yes
Bechdel_test_result -0.27 0.04 -6.12 0 Yes
Budget 0.00 0 0.9 0.37 No
GenreAdventure 0.34 0.09 3.66 0 Yes
GenreAnimation 0.41 0.09 4.37 0 Yes
GenreBiography 0.95 0.11 8.25 0 Yes
GenreComedy 0.14 0.07 2.13 0.03 Yes
GenreCrime 0.77 0.1 7.53 0 Yes
GenreDocumentary 0.97 0.4 2.42 0.02 Yes
GenreDrama 0.67 0.07 9.21 0 Yes
GenreFamily -0.27 0.63 -0.43 0.66 No
GenreFantasy -0.16 0.28 -0.56 0.57 No
GenreHorror -0.22 0.11 -2.07 0.04 Yes
GenreMusic -1.84 0.89 -2.06 0.04 Yes
GenreMusical 0.43 0.63 0.68 0.49 No
GenreMystery 0.47 0.24 1.93 0.05 No
GenreSci-Fi 0.21 0.4 0.54 0.59 No
GenreThriller -0.29 0.52 -0.56 0.57 No
GenreWestern 1.08 0.89 1.21 0.23 No
Residual Standard Error 0.89
Adjusted R-Squared 0.12

The linear regression model assesses how a film’s Bechdel Test result, budget, and genre are related to IMDb ratings.

Key Findings:

  • Bechdel Test: Statistically significant (p<0.001) with a negative coefficient (−0.275). This suggests that passing the Bechdel Test is associated with slightly lower IMDb ratings, contrary to general expectations.
  • Budget: Not significant (p=0.37), suggesting no measurable direct effect of budget on IMDb ratings in this model.
  • Genres:
    • Significant positive effects for genres like Adventure, Animation, Biography, Comedy, Crime, and Drama.

    • Negative effects for Horror and Music.

Model Fit:

  • Residual Standard Error: 0.889, indicating reasonable prediction accuracy for continuous IMDb ratings.

  • Adjusted R-Squared (0.1243): About 12.4% of the variance in IMDb ratings is explained, suggesting modest model fit.

Conclusion:

Genres such as Biography, Drama, and Adventure are strong predictors of higher IMDb ratings, with passing the Bechdel Test associated with slightly lower ratings. Budget shows no significant impact. This indicates that audience ratings are more influenced by content and storytelling aspects than by gender representation metrics.

Linear Regression Model for Nominations

Show the code
# Fit the linear regression model
Nominations_model <- lm(Nominations ~ Bechdel_test_result + Budget + Genre, data = df_unique)

# Extract and format the model summary
nominations_summary <- tidy(Nominations_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    `Std. Error` = std.error, 
    `t-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )

# Extract additional statistics (Residual Standard Error, Adjusted R-Squared)
model_stats <- summary(Nominations_model)
residual_se <- model_stats$sigma
adj_r_squared <- model_stats$adj.r.squared

# Add additional statistics as separate rows with appropriate data types
extra_rows <- tibble(
  Term = c("Residual Standard Error", "Adjusted R-Squared"),
  Estimate = round(c(residual_se, adj_r_squared), 2),  # Numeric values
  `Std. Error` = c(NA_real_, NA_real_),  # Numeric NA for consistency
  `t-value` = c(NA_real_, NA_real_),
  `p-value` = c(NA_real_, NA_real_),
  Significant = c(NA_character_, NA_character_)  # Character NA for consistency
)

# Combine original summary with additional rows
nominations_summary <- bind_rows(nominations_summary, extra_rows)

# Display the summary table
nominations_summary %>%
  mutate(across(where(is.numeric), ~ round(., 2)), # Round numeric columns to 2 decimals
         across(everything(), ~ ifelse(is.na(.), "", .))) %>%  # Replace NA with empty strings
  kable("html", caption = "Linear Regression Results for Nominations") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover", "condensed")) %>%
  column_spec(1, bold = TRUE) %>%
  column_spec(2:6, color = "darkblue")
Linear Regression Results for Nominations
Term Estimate Std. Error t-value p-value Significant
(Intercept) 2.75 1.52 1.8 0.07 No
Bechdel_test_result 0.39 0.81 0.48 0.63 No
Budget 0.00 0 10.14 0 Yes
GenreAdventure 8.92 1.7 5.26 0 Yes
GenreAnimation 4.39 1.7 2.58 0.01 Yes
GenreBiography 22.07 2.07 10.66 0 Yes
GenreComedy 2.54 1.21 2.1 0.04 Yes
GenreCrime 10.29 1.84 5.6 0 Yes
GenreDocumentary 1.98 7.25 0.27 0.78 No
GenreDrama 13.72 1.32 10.42 0 Yes
GenreFamily -4.25 11.41 -0.37 0.71 No
GenreFantasy -1.17 5.15 -0.23 0.82 No
GenreHorror -0.50 1.94 -0.26 0.8 No
GenreMusic -1.28 16.1 -0.08 0.94 No
GenreMusical 7.39 11.42 0.65 0.52 No
GenreMystery 2.16 4.38 0.49 0.62 No
GenreSci-Fi -1.19 7.24 -0.16 0.87 No
GenreThriller -7.32 9.31 -0.79 0.43 No
GenreWestern -10.06 16.09 -0.63 0.53 No
Residual Standard Error 16.07
Adjusted R-Squared 0.15

This model aims to analyze whether Bechdel Test results, budget, and genre predict the number of award nominations a film receives.

Key Findings:

  1. Budget: Strong and significant positive effect (p<0.001p < 0.001p<0.001), showing that higher budgets are associated with more nominations.

  2. Bechdel Test: Not significant (p=0.63p = 0.63p=0.63), suggesting no direct influence on nominations.

  3. Genres:

    • Biography, Adventure, Animation, Comedy, Crime, and Drama have significant positive effects.

    • Other genres, such as Documentary and Horror, are not significant.

Model Fit:

  • Residual Standard Error: 16.07, reflecting the variability in predictions for nominations.

  • Adjusted R-Squared (0.1528): Approximately 15.3% of the variance in nominations is explained by the predictors.

Conclusion:

Budget and genres, especially Biography, Drama, and Adventure, strongly predict the number of nominations a film receives. Passing the Bechdel Test has no significant effect, highlighting that industry nominations are driven by production scale and genre preferences rather than diversity as measured by the Bechdel Test.

Overall Conclusion

From all three models, it is evident that budget and genre are the most influential predictors of a film’s success across critical metrics such as awards, IMDb ratings, and nominations. The Bechdel Test, while an important measure of gender representation, does not show a significant direct impact on these outcomes. These findings suggest that while representation is crucial from a social and cultural perspective, its direct influence on critical acclaim and industry recognition may be more complex and nuanced. Future research could explore additional diversity measures or interactions between variables to better understand how representation contributes to a film’s overall success.

4.2.3. Can we build a predictive model to estimate a film’s success (revenue, awards, IMDb ratings) based on the Bechdel test results and other factors like budget, genre, and director?

This objective focuses on creating a predictive model to quantify how factors such as the Bechdel Test outcome, budget, and genre influence a film’s success. Success metrics like Revenue, Awards, and Imdb_Rating are used as dependent variables.

Utility:

We created a model to predict in advance the award winning potential of a movie. This model aims to guide studios and producers, marketing agencies in their investments in films. You can find it in teh following link: Movie Awards Predictor

Analysis Plan:

  • Train regression models (e.g., linear regression for IMDb ratings and revenue, Random forest for awards for better accuracy rate).

  • Evaluate model performance.

Show the code
# Split data into training and testing sets 
set.seed(123)  # For reproducibility
train_index <- sample(1:nrow(df_unique), 0.7 * nrow(df_unique))  # 70% for training
train_data <- df_unique[train_index, ]
test_data <- df_unique[-train_index, ]


# Build the linear regression model
lm_model <- lm(Revenue ~ Bechdel_binary + Budget + Imdb_Votes + Nominations + Gender, data = train_data)

# Extract meaningful results
logit_summary <- tidy(lm_model) %>%
  mutate(Significant = ifelse(p.value < 0.05, "Yes", "No")) %>%
  select(
    Term = term, 
    Estimate = estimate, 
    `Std. Error` = std.error, 
    `t-value` = statistic, 
    `p-value` = p.value, 
    Significant
  )


# Print as a nice table
logit_summary %>%
  kable("html", caption = "Linear Regression Results for revenue") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover"))
Linear Regression Results for revenue
Term Estimate Std. Error t-value p-value Significant
(Intercept) -4.786583e+07 2.647136e+07 -1.808212 0.0708272 No
Bechdel_binary1 1.737078e+07 1.293532e+07 1.342896 0.1795632 No
Budget 2.303279e+00 1.161074e-01 19.837490 0.0000000 Yes
Imdb_Votes 9.700023e+02 6.131045e+01 15.821157 0.0000000 Yes
Nominations 8.536414e+05 4.339227e+05 1.967266 0.0493857 Yes
Gender1 -1.410363e+07 2.539137e+07 -0.555450 0.5786919 No
Gender3 3.902202e+07 3.666533e+07 1.064276 0.2874208 No
Show the code
# Evaluate linear regression
predictions <- predict(lm_model, test_data)
actuals <- test_data$Revenue

Now we are moving to the second part of the question concerning awards, both the tables will be analyse in the key findings.

Show the code
# Random Forest for Awards 

# Convert awards to a factor for classification
train_data$Awards <- as.factor(train_data$Awards)


# Fit the Random Forest model with importance=TRUE
rf_model <- randomForest(Awards ~ Bechdel_binary + Budget + Imdb_Rating + Gender, 
                         data = train_data, 
                         importance = TRUE)

# Extract variable importance
rf_summary <- as.data.frame(importance(rf_model)) %>%
  rownames_to_column(var = "Term") %>%
  mutate(Significant = ifelse(MeanDecreaseGini > mean(MeanDecreaseGini), "Yes", "No")) %>%
  select(
    Term, 
    `Mean Decrease Accuracy` = MeanDecreaseAccuracy, 
    `Mean Decrease Gini` = MeanDecreaseGini, 
    Significant
  )

# Display the summary using kable
rf_summary %>%
  kable("html", caption = "Random Forest Variable Importance") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover"))
Random Forest Variable Importance
Term Mean Decrease Accuracy Mean Decrease Gini Significant
Bechdel_binary 0.0567033 11.43473 No
Budget 11.0677905 155.86869 Yes
Imdb_Rating 50.8751238 131.74801 Yes
Gender 1.5819192 11.18733 No

Key findings

  • Budget and IMDb rating are the most significant variables when it comes to awards and revenue. Higher budgets strongly drive revenue and higher ratings contribute significantly to revenue

  • Both the bechdel test result and the director’s gender do not impact significantly the revenue nor the awards winning.

We added a confusion matrix to evaluate the accuracy of the model along with the specificity and sensitivity

Show the code
# Predict on test data
rf_predictions <- predict(rf_model, test_data)

# Confusion matrix for Random Forest
cm <- confusionMatrix(rf_predictions, as.factor(test_data$Awards))

# Extract metrics
accuracy <- cm$overall['Accuracy']
sensitivity <- cm$byClass['Sensitivity']
specificity <- cm$byClass['Specificity']

# Create a data frame for the table
metrics <- data.frame(
  Metric = c("Accuracy", "Sensitivity", "Specificity"),
  Value = round(c(accuracy, sensitivity, specificity), 2)
)

# Generate and style the table with kableExtra
kable(metrics, col.names = c("Metric", "Value"), caption = "Performance Metrics for Random Forest for Awards") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover", "condensed")) %>%
  column_spec(1, bold = TRUE, border_right = TRUE) %>%
  column_spec(2, color = "darkblue")
Performance Metrics for Random Forest for Awards
Metric Value
Accuracy Accuracy 0.78
Sensitivity Sensitivity 0.20
Specificity Specificity 0.94
  • The model performance of the random forest for awards has an accuracy of 76% but the Sensitivity is low (32%), meaning the model struggles to identify films that don’t win awards. This can be explain by the asymmetry between the number of movies that have received awards (79.26%) and the one that didn’t (20.21%).

  • The random forest classification offer us insight in the importance of the different variables: MDb Rating: The most important predictor, contributing significantly to model accuracy (%IncMSE = 40.95) and Budget The second most important variable (%IncMSE =15.02)

Conclusion

A high budget combined with a high IMDb rating are strong indicators of a film’s likelihood of winning awards, as they significantly impact the model’s predictions. In contrast, the Bechdel test result and the director’s gender do not show a meaningful direct association with awards success. However, it is important to interpret these findings cautiously. As observed in our exploratory data analysis, male-directed movies often receive higher budgets and achieve higher IMDb ratings. This suggests that gender may indirectly influence awards outcomes through these other factors, underscoring the need for careful interpretation and further investigation into systemic biases.

4.2.4. Can we develop a predictive model to determine whether a film will pass the Bechdel Test based on factors such as budget, genre, and director?

This question aims to predict whether a film will pass the Bechdel Test based on its features, such as Budget, Genre, and Director's gender. This can offer insights into factors that align with better gender representation.

Utility:

The intention of this model is to offer critic public a prediction beforehand whether the movie will pass or not the test hence wheter it is aligned with their principles (e.g. female representation).

Analysis Plan:

  • Treat Bechdel_test_result as a binary outcome for passing or failing.

  • Use random forest for prediction using Bechdel_binary as the dependent variable.

  • Evaluate model performance using accuracy, precision, recall, and AUC.

Show the code
varImpPlot(rf_model)

Key findings

  • Significant Predictors:

    • Genre: A consistently strong predictor across both models. Specific genres like Drama, Comedy, and Horror are more likely to pass the Bechdel Test.

    • Gender: Director gender significantly influences passing the Bechdel Test,when the director is male, the probability of a movie passing the test decrease.

    • IMDb Rating: Higher IMDb ratings slightly decrease the likelihood of passing the Bechdel Test.

  • Budget, Awards, and IMDb Votes are less critical in determining whether a film passes the Bechdel Test.

  • Mean decreased accuracy shows that the most important variable for the accuracy of the model are Genre, gender and IMDb_votes, they are key factor for determining whether a film passes the Bechdel Test.

Show the code
# Predictions and evaluation
rf_predictions <- predict(rf_model, test_data)

# Ensure random forest predictions are factors
rf_predictions <- as.factor(rf_predictions)
levels(rf_predictions) <- levels(test_data$Bechdel_binary)  # Align levels with test data

# Confusion matrix for Random Forest
cm <- confusionMatrix(rf_predictions, test_data$Bechdel_binary)

# Extract metrics
accuracy <- cm$overall['Accuracy']
sensitivity <- cm$byClass['Sensitivity']
specificity <- cm$byClass['Specificity']

# Create a data frame for the table
metrics <- data.frame(
  Metric = c("Accuracy", "Sensitivity", "Specificity"),
  Value = round(c(accuracy, sensitivity, specificity), 2)
)

# Generate and style the table with kableExtra
kable(metrics, col.names = c("Metric", "Value"), caption = "Performance Metrics for Random Forest (Bechdel Binary)") %>%
  kable_styling(full_width = FALSE, bootstrap_options = c("striped", "hover", "condensed")) %>%
  column_spec(1, bold = TRUE, border_right = TRUE) %>%
  column_spec(2, color = "darkblue")
Performance Metrics for Random Forest (Bechdel Binary)
Metric Value
Accuracy Accuracy 0.61
Sensitivity Sensitivity 0.74
Specificity Specificity 0.46
  • The Random Forest model demonstrates an accuracy of 61%, indicating that it correctly predicts the Bechdel binary outcome in 61% of cases. The sensitivity is 72%, meaning it effectively identifies positive cases, while the specificity is 47%, reflecting a lower ability to correctly classify negative cases.

Conclusion

Genre emerges as the most critical predictor across both models, with specific genres like Drama, Comedy, Biography, and Horror significantly associated with passing the test. IMDb Votes also plays a substantial role, indicating that audience engagement correlates with a higher likelihood of passing. Director gender shows moderate importance, with logistic regression suggesting that male-directed films are less likely to pass the test as shown in the EDA part. Awards, however, have minimal predictive power, showing no meaningful relationship with the Bechdel Test outcome.

5. Conclusion

The results of this analysis offer valuable insights into the relationship between the Bechdel Test and various film-related factors, including revenue, awards, and IMDb ratings. Through statistical tests, predictive modeling, and data exploration, several key findings have emerged that address our project goals.

First, our analysis reveals that passing the Bechdel Test does not have a direct, statistically significant effect on a film’s revenue once other factors, such as budget, genre, and IMDb ratings, are controlled for. While initial correlations suggested a weak inverse relationship between passing the test and revenue, these associations were largely confounded by genre and budget. Predictive modeling also confirmed that the Bechdel Test outcome is not independently influenced by revenue but is instead shaped by factors such as genre and director gender, which indirectly affect the test’s results.

Second, films that pass the Bechdel Test do not show a significant advantage in terms of awards won. However, IMDb ratings were moderately higher for films that fail the Bechdel Test, potentially reflecting biases in audience reception or content characteristics. Predictive models developed during the study, such as logistic regression and random forest, highlighted genre and director gender as the strongest predictors of a film passing the Bechdel Test. Specifically, certain genres like Drama, Comedy, Biography, and Horror showed higher likelihoods of passing, while male-directed films were less likely to pass, a trend that may be partially explained by disparities in budgets and creative choices rather than inherent bias.

In terms of predictive modeling, we successfully developed models to estimate a film’s success in terms of revenue and awards, as well as its likelihood of passing the Bechdel Test. The random forest model outperformed logistic regression in predictive power, identifying Genre, IMDb Votes, and Budget as the most influential factors in determining success and test outcomes. These models provided moderate accuracy, highlighting areas where additional variables, such as runtime or content diversity, could enhance predictive capabilities.

Finally, the trend visualization confirmed that genre, budget, and director gender are strongly associated with both Bechdel Test outcomes and economic success metrics. While films that pass the Bechdel Test often align with genres featuring diverse character interactions, their financial and critical success appears more strongly tied to production scale and audience engagement. These findings underline the importance of carefully considering contextual factors when evaluating the economic impact of female representation in film.

5.1 Final Remarks

While the Bechdel Test provides a useful lens for analyzing female representation, its influence on a film’s economic success is intertwined with broader industry dynamics. This study highlights that gender inclusivity in films is often shaped by structural factors, such as budget allocation and genre conventions, rather than directly impacting financial performance. Future research could explore additional predictors, such as the impact of the director’s gender, investigate causal pathways, and refine models to better understand the evolving relationship between gender and the broader film industry.